<h1>Log Entries<%= " - #{@logged_action.logged_controller.name}, Action: <em>#{@logged_action.name}</em>" if @logged_action %></h1>

<center>
<table class="parent_list">
	<tr class="title_row">
		<th>Action with Params</th>
		<th>Count</th>
	</tr>
<% for log_entry_group in @log_entries.group_by :action_name -%>
	<tr>
		<td><%= log_entry_group.first.action_name || "none" %></td>
		<td class="numbers"><%= log_entry_group.map(&:count_by_params).sum %></td>
	</tr>
	<tr>
		<td colspan="2"style="padding: 0px; padding-left:20px;">
			<table style="<%= 'display:none;' unless @logged_action %> width:100%;" id="params_for_<%= log_entry_group.first.action_name %>" class="child_list">
				<% for log_entry in log_entry_group -%>
				 	<tr>
				 		<td><%= log_entry.params.empty? ? "<em>no params</em>" : hash_to_html(log_entry.params) %></td>
				 		<td class="numbers"><%= log_entry.count_by_params %></td>
				 	</tr>
				<% end -%>
			</table>
		</td>
	</tr>
<% end -%>
</table>
</center>
